package com.cuixichang.minimalism.service;

import com.cuixichang.minimalism.transfer.dto.IRolePermissionDTO;
import com.cuixichang.minimalism.transfer.po.IRolePermission;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;
/**
 * 系统角色权限关系表服务接口
 *
 * @author cuixichang
 * @date 2024-12-18
 */
public interface IRolePermissionService{

    IRolePermissionDTO selectById(Long id);

    IRolePermissionDTO selectOne(IRolePermissionDTO iRolePermissionDTO);

    List<IRolePermissionDTO> selectByIds(List<Long> ids);

    List<IRolePermissionDTO> selectList(IRolePermissionDTO iRolePermissionDTO);

    List<IRolePermissionDTO> selectList(IRolePermissionDTO iRolePermissionDTO, BiConsumer<IRolePermission, QueryWrapper<IRolePermission>> consumer);

    Page<IRolePermissionDTO> selectPage(IRolePermissionDTO iRolePermissionDTO, long pageSize, long pageNo);

    Page<IRolePermissionDTO> selectPage(IRolePermissionDTO iRolePermissionDTO, long pageSize, long pageNo, BiConsumer<IRolePermission, QueryWrapper<IRolePermission>> consumer);

    int deleteById(Long id);

    int deleteByIds(List<Long> ids);

    int deleteByCondition(IRolePermissionDTO iRolePermissionDTO);

    int deleteByCondition(IRolePermissionDTO iRolePermissionDTO, BiConsumer<IRolePermission, QueryWrapper<IRolePermission>> consumer);

    IRolePermissionDTO insert(IRolePermissionDTO iRolePermissionDTO);

    IRolePermissionDTO insertHasOption(IRolePermissionDTO iRolePermissionDTO, Function<IRolePermissionDTO,IRolePermissionDTO> preOption);

    int updateById(IRolePermissionDTO iRolePermissionDTO);

    int updateById(IRolePermissionDTO iRolePermissionDTO, BiConsumer<IRolePermission, UpdateWrapper<IRolePermission>> consumer);
}